#include <stdio.h>

void sort(int *a, int n) {
	for (int j = 0; j < n; j++) {
		for (int i = 0; i < n - j - 1; i++) {
			if (a[i] > a[i + 1]) {
				int temp = a[i];
				a[i] = a[i + 1];
				a[i + 1] = temp;
			}
		}
	}

}

int main() {
	int A[] = {2, 1, 3, 4, 5, 6};
	int size = sizeof(A) / sizeof(int);
	sort(A, size);
	for (int i = 0; i < size; i++)
		printf("%d ", A[i]);
	return 0;
}